package com.jiang.daily.Q2749;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/09/05 13:58
 */
class Solution {
    public int makeTheIntegerZero(int num1, int num2) {
        long k = 1;
        while (true) {
            long temp = num1 - num2 * k;
            if (k > temp) return -1;
            if (k >= Long.bitCount(temp)) return (int) k;
            k++;
        }
    }
}
